1. Field of the Invention
This invention relates to disk. drive storage for computer systems and, more particularly, to a method and a controller for processing high level commands from a host computer that require multiple seeks to one or more disk drives.
2. Description of the Prior-Art
It is known to configure multiple disk drives into a RAID (Redundant Array of Inexpensive disks) array. Array controllers have historically performed a cumulative exclusive OR (XOR) operation to generate parity data and accomplish its rewrite to parity spaces on the individual disk drives. The prior art has also performed the cumulative XOR operation in the disk drives themselves.
Performing the XOR operation in the disk drive may result in a reduced number of data transfers across an interconnecting network. When an XOR operation is performed by a storage array controller, four data transfer operations are required for a typical update write sequence and the array controller performs two XOR operations during the sequence. If the array controller is used in a supervisory mode (with the disk drives performing the XOR operations), only three data transfer operations are required between the array controller and the individual disk drives, i.e., a write transfer to the disk drive containing the protected data, a read transfer from the disk drive containing the protected data and a write transfer to the device containing the parity data. By performing the XOR operation in a disk drive, the array controller need not perform any XOR operations.
Controllers for disk drives are known that execute low level commands. Two examples are a disk drive utilizing a SCSI (Small Computer System Interface) controller. On the other hand, a high level command requires two or more actions that otherwise would be controlled by separate SCSI commands.
A number of high level commands, proposed by the T10 committee of NCITS for an American National Standard are described in a document entitled dpANS NCITS 306-199X, Project 996D, Information Technology-SCSI-3 Block commands (SBC), dated Nov. 13, 1997. The proposed high level commands include, for example, XDWRITE EXTENDED, XPWRITE, REGENERATE AND REBUILD. Each of these commands requires a third party XOR operation.
Current SCSI disk drives can only accept low level commands, such as SCSI commands, and are incapable of processing high level commands.
Thus, there is a need for a method and controller that can process high level commands for disk drives.
The present invention processes high level commands with a method and controller that parses them into low level subcommands that can be executed by low level command execution means contained in a disk drive. The high level commands supplied by a host computer contain command information that identifies the high level command type and the identities of a local drive and a peer drive.
The method of the invention forms a task control block for each high level command received from the host computer. Each of the task control blocks includes the command information and a list of low level subcommands for the high level command type. When one of the task control blocks is selected, its low level subcommands are presented for execution by the command execution means of the local disk drive or of the peer disk drive. Status of the low level subcommands of the selected task control block is updated as the command execution means of the peer drive or the local drive reports completion of the low level subcommands.
When all of the low level subcommands for the selected high level command have been completed, the host computer is notified that the selected high level command has been completed. The process is repeated for other task control blocks that have been formed.
The execution of a low level subcommand is deferred if another low level subcommand must be executed first. In the XDWRITE EXTENDED command, for example, a write of new data is deferred until new and old data have been transferred to a buffer, an XOR subcommand is deferred until the old and new data are available, and a parity write subcommand to a peer drive is deferred until an XOR subcommand has been executed.
The controller of the present invention includes a processor, a memory, and a task manager program. The task control program controls the processor to perform the steps of the method.